<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:cs="http://myfaces.apress.com/custom" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"
	xmlns:bf="http://www.bssmanager.com/jsf" xmlns:c="http://java.sun.com/jstl/core"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions">

	<h:form>
		<h3>Receipt</h3>

		<rich:panel style="border:0px;">
			<h:outputText value="ID: #{receiptController.id}" />
			<rich:dataTable value="#{receiptController.receipt.payments}" var="payment">
				<f:facet name="header">
					<h:outputText value="Payments" />
				</f:facet>
				<rich:column>
					<f:facet name="header">Type</f:facet>
					<h:outputText value="#{payment.paymentType.name}"/>
				</rich:column>
				<rich:column>
					<f:facet name="header">Info</f:facet>
					<h:outputText value="#{payment.payable}"/>
				</rich:column>
				<rich:column>
					<f:facet name="header">Start Date</f:facet>
					<h:outputText value="#{payment.dateStart}">
						<f:convertDateTime pattern="dd MMM yy" />
					</h:outputText>
				</rich:column>
				<rich:column>
					<f:facet name="header">End Date</f:facet>
					<h:outputText value="#{payment.dateEnd}">
						<f:convertDateTime pattern="dd MMM yy" />
					</h:outputText>
				</rich:column>	
				<rich:column>
					<f:facet name="header">Amount</f:facet>
					<h:outputText value="#{payment.amount} " />
				</rich:column>
			</rich:dataTable>
		</rich:panel>
	</h:form>
</ui:composition>